package com.code.wanmi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.code.wanmi.entity.wm_user.WmSysRoleMenu;
import com.code.wanmi.util.DataSource;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author 谢晓峰
 * @since 2019-12-05
 */
@Mapper
public interface WmSysRoleMenuMapper extends BaseMapper<WmSysRoleMenu> {
    //添加角色菜单权限
    @DataSource("wmuser")
    @Insert("insert into wm_user.wm_sys_role_menu values(#{roleId},#{menuId})")



    int addUserMenu(WmSysRoleMenu wmSysRoleMenu);
    //修改角色菜单权限
//    @DataSource("wmuser")
//    @Update("update wm_user.wm_sys_role_menu set menu_id=#{nMenuId} where role_id=#{roleId} and menu_id=#{menuId}")
//    int updateMenu(WmSysRoleMenu wmSysRoleMenu,long nMenuId);
}
